package com.xzx.refactoring;

/**
 * 租赁
 * @author xinzhixuan
 * @version V1.0
 * @date 2017/8/27 20:25
 */
public class Rental {
    private Movie movie;
    private int daysRented;

    public Rental(Movie movie, int daysRented) {
        this.movie = movie;
        this.daysRented = daysRented;
    }

    public Movie getMovie() {
        return movie;
    }

    public int getDaysRented() {
        return daysRented;
    }

    public double getCharge() {
        return getMovie().getCharge(daysRented);
    }

    public int getFrequentRentalPoints() {
        return getMovie().getFrequentRentalPoints(daysRented);
    }
}
